package sanyueer;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;

public class CollectionToArray {
    public static void main(String[] args) {
        Collection<String>c=new ArrayList<>();
        c.add("123");
        c.add("234");
        c.add("345");
        System.out.println(c);
        String[]array=c.toArray(new String[0]);
        System.out.println(Arrays.toString(array));
    }
}
